﻿using LJ.Abstractions.Pack;
using LJ.FaultHandler.Abstractions;
using LJ.FaultHandler.Abstractions.Pack;
using LJ.FaultHandler.Polly.Internal;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LJ.FaultHandler.Polly.Pack;

public abstract class FaultHandlerPollyPackBase : PackBase, IFaultHandlerPack
{
    public override void Add(IPackContext packContext)
    {
        packContext.ConfigManager.Add<PollyFaultHandlerConfig>("FaultHandler");
        packContext.DependencyManager.ServiceCollection.AddTransient<IFaultHandlerFactory, PollyFaultHandlerFactory>();
        packContext.DependencyManager.ServiceCollection.AddTransient<IFaultHandler, PollyFaultHandler>();
    }

    public override void Use(IPackProvider packProvider)
    {
    }
}
